how to write a test for solidity contract